﻿@using KRM.Core
@model tblBook
<div class="portlet" style="margin-bottom: 0px">
                  <div class="portlet-title">
                     <div class="caption"><i class="icon-comments"></i>Action List</div>
                     <div class="tools">
                        <a href="" class="collapse"></a>
                     </div>
                  </div>
<div class="portlet-body" id="">
    <div class="" style="overflow: auto;max-height:200px">
        <ul class="chats">
            @foreach (var item in Model.tblBookComments)
            {
                var classnote = "";
                var classLabel = "";
                switch (item.tblBookCommentType.Id)
                {
                    case (int) BookCommentTypes.Accept:
                        classLabel = "label  label-bookstatus-accepted";
                        classnote = "note note-success";
                        break;
                    case (int) BookCommentTypes.Decline:
                        classLabel = "label  label-bookstatus-declined";
                        classnote = "note note-danger";
                        break;
                    case (int) BookCommentTypes.Cancel:
                        classLabel = "label  label-bookstatus-canceled";
                        classnote = "note note-warning";
                        break;
                    case (int) BookCommentTypes.Comment:
                        classLabel = "label  label-bookstatus-Comment";
                        classnote = "note note-info";
                        break;
                    default:
                        classLabel = "label label-default";
                        classnote = "note note-default";
                        break;
                }
                <li class="in" >
                    <img class="avatar img-responsive" alt="" src="/Upload/Avatar/@item.tblPersonal.Image??avatar-default.jpg" />
                    <div class="message" style="font-weight: 400;font-size: 14px;">
                        <span class="arrow"></span>
                        <a href="#" class="name">@item.tblPersonal.FullName</a>
                        <span class="datetime">@(item.tblBookCommentType.Name) request at @item.DateCreated</span>
                        <span style="float:right">
                            Action : <span class="@classLabel"> @item.tblBookCommentType.Name</span>
                        </span>
                        <span class="body">
                            Reason: @item.Comment
                        </span>
                    </div>
                </li>
            }
        </ul>
    </div>
</div>
</div>



@*

<div style="max-height: 200px; overflow: auto">

    @foreach (var item in Model.tblBookComments)
    {
        var classnote="";
        var classLabel="";
        switch (item.tblBookCommentType.Id)
        {
            case (int) BookCommentTypes.Accept:
                classLabel = "label  label-success";
                classnote = "note note-success";
                break;
            case (int) BookCommentTypes.Decline: 
                classLabel = "label  label-danger";
                classnote = "note note-danger";
                break;
            case (int) BookCommentTypes.Cancel: 
                classLabel = "label  label-default";
                classnote = "note note-warning";
                break;
            case (int) BookCommentTypes.Comment: 
                classLabel = "label  label-info";
                classnote = "note note-info";
                break;
            default: 
                classLabel = "label label-default" ;
                classnote = "note note-default";
                break;
        }
        <div class="@classnote" >
            <div class="row">
                <div class="col-md-9">
                    <p>@(item.tblPersonal.FullName+" "+item.tblBookCommentType.Name +"  request")</p>
                </div>
               
                <div class="col-md-3">
                    <p>Action :   
                        <span class="@classLabel">@item.tblBookCommentType.Name</span>
                    </p>
                </div>
            </div>   
            <div class="row">
                <div class="col-md-9">
                    Reason:
                    <p>@item.Comment</p>
                </div>
                <div class="col-md-3">
                    Date:
                    <p>@item.DateCreated</p>
                </div>
            </div>

        </div>
    }
</div>*@